//
//  YHNetworkManager.h
//  TestYoho
//
//  Created by YiDarren on 17/1/23.
//  Copyright © 2017年 YiDarren. All rights reserved.
//

#import "AFHTTPSessionManager.h"
#import "YHSessionInfo.h"

@interface YHNetworkManager : AFHTTPSessionManager

+ (instancetype)manager;
+ (instancetype)sharedInstance;

- (void)getWithSessionInfo:(YHSessionInfo *)sessionInfo success:(void(^)(NSURLSessionDataTask *task, id responseObject))success failure:(void(^)(NSURLSessionDataTask *task, NSError *error))failure;

- (void)postWithSessionInfo:(YHSessionInfo *)sessionInfo success:(void(^)(NSURLSessionDataTask *task, id responseObject))success failure:(void(^)(NSURLSessionDataTask *task, NSError *error))failure;

- (void)putWithSessionInfo:(YHSessionInfo *)sessionInfo success:(void(^)(NSURLSessionDataTask *task, id responseObject))success failure:(void(^)(NSURLSessionDataTask *task, NSError *error))failure;

- (void)patchWithSessionInfo:(YHSessionInfo *)sessionInfo success:(void(^)(NSURLSessionDataTask *task, id responseObject))success failure:(void(^)(NSURLSessionDataTask *task, NSError *error))failure;

- (void)deleteWithSessionInfo:(YHSessionInfo *)sessionInfo success:(void(^)(NSURLSessionDataTask *task, id responseObject))success failure:(void(^)(NSURLSessionDataTask *task, NSError *error))failure;

- (void)uploadWithSessionInfo:(YHSessionInfo *)sessionInfo success:(void(^)(NSURLSessionDataTask *task, NSError *error))success failure:(void(^)(NSURLSessionDataTask *task, NSError *error))failure;
//post 多表
- (void)uploadWithSessionInfo:(YHSessionInfo *)sessionInfo constructingBodyWithBlock:(void(^)(id<AFMultipartFormData> formData))bodyBlock success:(void(^)(NSURLSessionDataTask *task, NSError *error))success failure:(void(^)(NSURLSessionDataTask *task, NSError *error))failure;


@end
